home *** CD-ROM | disk | FTP | other *** search
- /*
- File: MemDebg.h
-
- Contains: Memory management debugging routines
-
- Owned by: Jens Alfke
-
- Copyright: © 1993 - 1995 by Apple Computer, Inc., all rights reserved.
-
- */
-
-
- #ifndef _MEMDEBG_
- #define _MEMDEBG_
- #pragma once
-
- #ifndef _MEMMGR_
- #include "MemMgr.h"
- #endif
-
-
- #ifdef __cplusplus
- class SOMObject;
- class StackCrawl;
- #define OPTIONAL =0
- #else
- #include <somobj.h>
- typedef int StackCrawl;
- #define OPTIONAL
- #endif
-
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #pragma lib_export on
-
-
- void MMBeginMemValidation( void );
- void MMEndMemValidation( void );
- void MMBeginHeapChecking( void );
- void MMEndHeapChecking( void );
-
- MMBoolean MMValidatePtr( ConstMMBlock, MMBoolean validateHeap, const char *operation OPTIONAL );
- MMBoolean MMValidateObject( const SOMObject *o );
- MMBoolean MMValidateHandle( MMHandle );
-
- MMBoolean MMDoesHeapExist( MemHeap *heap );
- MMBoolean MMValidateHeap( MemHeap *heapID, const void* ptr OPTIONAL );
- MMBoolean MMValidateAllHeaps( void );
-
- void MMGetHeapInfo( MemHeap *heapID,
- const char* *name, size_t *allocated, size_t *free,
- size_t *nBlocks, size_t *nObjects );
-
- typedef MMBoolean (*MMBlockInfoProc)( ConstMMBlock, size_t size, MMBoolean isObject, void *refCon );
-
- void MMWalkHeap( MemHeap *heapID, MMBlockInfoProc, void *refCon );
-
- MMBoolean MMFindBlockContaining( const void *start, const void *end,
- const void* *blockStart, const void* *blockEnd );
- MMBoolean MMValidateMemoryRange( const void *start, const void *end );
-
- MMBoolean MMTrackStackCrawls( MMBoolean track );
- StackCrawl* MMGetBlockStackCrawl( const void *block, long *flags );
- void MMSetBlockStackCrawl( const void *block, StackCrawl*, long flags );
-
- void MMBeginLeakChecking( void );
- void MMEndLeakChecking( void );
-
-
- #pragma lib_export off
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /*_MEMDEBG_*/
-